package myky.com.doctorapp.presenter

import io.reactivex.disposables.Disposable
import myky.com.doctorapp.entity.DiseaseEntity
import myky.com.doctorapp.base.BasePresenterIm
import myky.com.doctorapp.base.RxSubscribe
import myky.com.doctorapp.contract.ListActivityContract
import myky.com.doctorapp.model.ListActivityModel

/**
 * Description:
 *
 * @author wuyangwuyang
 * Created by 2019/2/14 on 15:50
 */
class ListActivityPresenter:BasePresenterIm<ListActivityContract.View>(),ListActivityContract.Presenter{


    val listActivityModel:ListActivityModel= ListActivityModel()
    override fun pDiseaseList(selectid:Int,current:Int,type:Int,size:Int) {

        listActivityModel.getDiseaseList(selectid,current,type,size).subscribe(object :RxSubscribe<DiseaseEntity.DataBean>(){
            override fun onSuccess(t: DiseaseEntity.DataBean?) {
                mView.showDataSuccess(t)
            }

            override fun onFailed(code: Int, msg: String?) {
            }

            override fun onSubscribe(d: Disposable) {
                addSubscription(d)
            }


        })
    }


}
